package com.ciwong.epaper.modules.me.dao;

import com.ciwong.mobilelib.utils.EAction;

/**
 * 我 相关Action
 *
 * @author bin
 * @version ciwong v.1.0 2015/7/23 20:03
 * @since ciwong v.1.0
 */
public class MeAction extends EAction {

    /**
     * 注册用户
     */
    public static final String ACTION_REGIST_USER = HOST + "/v5/user/v2/register";


    /**
     * 测试支付接口
     * https://pay.ciwong.com/cash/AlipayMobileNotify
     */
    public static final String Test = "http://pay.ciwong.com/cash/AlipayMobileNotify&service=mobile.securitypay.pay&payment_type=1&_input_charset=utf-8&it_b_pay=30m&sign=D5%2bGH100xa9qlPzfvMDjBq22o1NDY6fzwkvighktUho85WQTGsAB8ScLbRchShLMLBZRd9GI9pMk3%2bw3PKWB%2f8wOkyNPPFZZJbWJPNLY5x2b0I3uoCexjS%2bdqFJQwSq7eCpXAGpuGqYcDAPHEx7qb5sibnsbAZIBlKfoZW6ttw8%3d&sign_type=RSA";

    /**
     * 习网登陆获取TOKEN
     */
    public static final String ACTION_GET_USER_TOKEN = BASE_HOST
            + "/oauth/v4/token_captcha";

    //public static final String ACTION_GET_USER_TOKEN = "http://eapi.jiaofucloud.cn/gateway/oauth/v3/token";

    /**
     * 习网意见反馈接口
     */
    public static final String ACTION_GET_ISSUED = BASE_HOST
            + "/v1/brand/issued";

    /**
     * 习网登录刷新TOKEN
     */
    public static final String ACTION_UPDATE_USER_TOKEN = BASE_HOST
            + "/oauth/v2/refreshToken";

//    public static final String ACTION_GET_USER_TOKEN = BASE_HOST+":8000"
//            + "/v5/epaperwork/getUserWorkDetail";


    /**
     * 获取个人信息
     */
    public static final String ACTION_GET_USER_INFO_BASE = HOST
            + "/v1/user/get_info_base";

    /**
     * 获取当前登录用户信息，并返回所在学校和班级信息
     */
    public static final String ACTION_GET_DETAIL_USER_INFO = HOST
            + "/v5/user/info";
    /**
     * 获取个人信息（全媒体电子报使用习网接口）
     */
    public static final String ACTION_GET_USER_INFO_BASE_CIWONG = BASE_HOST
            + "/v2/user/get_info_base";

    /**
     * 获取用户学校信息
     */
    public static final String ACTION_GET_SCHOOL_INFO = HOST
            + "/v4/relation/school/get_my_school";

    /**
     * 我的学习记录
     */
    public static final String ACTION_GET_MY_STUDY_RECORD = HOST
            + "/v2/epaperwork/submit_work_records";

    /**
     * 获取听说模考批改结果
     */
    public static final String ACTION_GET_LISTEN_WORK_CORRECT = HOST
            + "/v1/epaperwork/examination/listen_work_correct_contents";

    /**
     * 开通试用期服务
     */
//    public static final String ACTION_OPEN_EXPERIMENT = HOST
//            + "/v4/relation/user/set_service_trial";

    public static final String ACTION_OPEN_EXPERIMENT = HOST
            + "/v5/user/v2/set_service_trial";
    /**
     * 判断是否有家长绑定
     */
    public static final String ACTION_GET_MYPARENT = HOST
            + "/v1/wechat/getMyParent";
    /**
     * 通知家长购买
     */
    public static final String ACTION_SEN_BUY_SERVICE = HOST
            + "/v1/wechat/senBuyService";

    /**
     * 是否开通服务
     */
//    public static final String ACTION_SERVICE_STATE = HOST
//            + "/v4/relation/user/get_service_state";
    public static final String ACTION_SERVICE_STATE = HOST
            + "/v5/user/v2/get_service_state_by_userid";

    /**
     * 获取不同模块作业提交情况统计
     */
    public static final String ACTION_DOWORK_REPORT = HOST
            + "/v1/epaperwork/dowork_report";

    /**
     * 通过CODE获取TOKEN(说明:获取token,包含习网token和第三方token)
     */
    public static final String ACTION_GET_TOKEN_BY_CODE = HOST
            + "/v2/oauth/get_token_by_code";

    /**
     * (三) 通过第三方openid获取习网token(说明:由于QQ移动应用不支持Oauth2.0方式，通过openid
     * access_token来校验合法性，通过则返回习网token)
     */
    public static final String ACTION_GET_TOKEN_BY_OPENID = HOST
            + "/v2/oauth/get_token_by_openid";

    /**
     * 修改用户信息
     */
    public static final String ACTION_POST_UPDATE_USER_INFO = HOST
            + "/v1/user/update_avatar";

    /**
     * 修改用户信息
     */
    public static final String ACTION_POST_UPDATE_USER_BG_INFO = HOST
            + "/v5/user/background";

    /**
     * 修改用户信息（全媒体电子报使用习网接口）
     */
    public static final String ACTION_POST_UPDATE_USER_INFO_CIWONG = BASE_HOST
            + "/v2/user/set_info";

    /**
     * 根据邀请码加入班级
     */
    public static final String ACTION_JOIN_CLASS = HOST
            + "/v4/relation/class/join_by_code";

    /**
     * 根据班级  id加入班级
     */
    public static final String ACTION_JOIN_CLASS_BY_ID = HOST
            + "/v5/class/join_class_by_Id";


    /**
     * 获取班级列表
     */
    public static final String ACTION_GET_CLASS_LIST = HOST
            + "/v4/relation/class/get_my_classes";

    /**
     * 获取班级列表
     */
    public static final String ACTION_GET_CLASS_MEMBERS = HOST
            + "/v4/relation/class/get_members";

    /**
     * 根据电话号码获取班级列表
     */
    public static final String ACTION_GET_CLASS_LIST_BY_MOBILE = HOST
            + "/v5/class/get_my_classes_by_mobile";

    /**
     * 获取班级详情
     */
    public static final String ACTION_GET_CLASS_DETAIL = HOST
            + "/v5/class/get_class_by_classId";

    /**
     * 根据邀请码获取班级信息
     */
    public static final String ACTION_GET_CLASS_INFO = HOST
            + "/v4/relation/class/join_by_code";

    /**
     * 获取绑定手机号短信验证码
     */
    public static final String ACTION_GET_SMS_VERITY_CODE = HOST + "/v5/user/sendVerifyCaptchaCode";
    /**
     * 绑定手机号接口
     */
    public static final String ACTION_BIND_PHONE = HOST + "/v5/user/bindMobile";

    /**
     * 重置密码
     */
    public static final String ACTION_RESET_PSW = HOST + "/v5/user/v2/setPassword";


    /**
     * 验证验证码是否正确
     */
    public static final String ACTION_CHECK_SMS_VERITY_CODE = HOST + "/v5/user/checkVerifyCode";
    /**
     * 获取我的错题
     */
    public static final String ACTION_GET_WRONG_QUESTON = HOST
            + "/v1/epaperwork/paper_analytical";
    /**
     * 根据手机号获取用户userid
     */
    public static final String ACTION_GET_USER_ID_BY_PHONE = HOST + "/v5/service/get_user_by_mobile";

    /**
     * 验证密码
     */
    public static final String ACTION_VERIFY_PWD = BASE_HOST
            + "/v2/user/verify_pwd";

    /**
     * 修改密码
     */
    public static final String ACTION_MODIFY_PWD = BASE_HOST
            + "/v5/user/new/v2/updatePwd";

    /**
     * 获取服务列表
     */
//    public static final String ACTION_GET_SERVICE_LIST = HOST
//            + "/v5/service/get_epage_service";

    public static final String ACTION_GET_SERVICE_LIST = HOST
            + "/v5/service/v2/get_epage_service";

    /**
     * 习币开通服务接口
     */
    public static final String ACTION_IS_BUY_SERVICE = BASE_HOST
            + "/v5/pay/Epape/BuyService";

    /**
     * 获取服务类型及价格
     */
    public static final String GET_GET_SERVICE_PIRCE = HOST
            + "/v4/relation/user/get_Service_Pirce";

    /**
     * 判断是否绑定手机号接口
     */
    public static final String GET_BIND_PHONE_INFO = HOST + "/v5/user/bindInfo";


    /**
     * 添加失败日志反馈
     */
    public static final String ACTION_ADD_FEEDBACK_LOG = HOST
            + "/v5/userlogs/addLog";


    /**
     * 支付状态
     */
    public static final String ACTION_REF_PLAY_STATE = "http://api.xixin61.com"
            + "/v2/pay/User/GetRechargeInfo";
    /**
     * 免费获取服务接口  也是jar包中获取订单接口
     */
    public static final String ACTION_REF_PLAY_GET_ORDER = BASE_HOST + "/v5/service/v2/set_epage_service_order";

    public static final String ACTION_GET_SUBJECT_LIST = BASE_HOST + "/v5/shop/v2/get_shop_headsubjects";
    /**
     * 请求服务器，获取积分（服务器添加后返回）
     */
    public static final String ACTION_GET_POINT = BASE_HOST + "/v2/integral/getnewintegral";
    /**
     * 请求服务器，获取积分
     */
    public static final String ACTION_ADD_POINT = BASE_HOST + "/v2/integral/addintegral";
    /**
     * 请求服务器，获取用户积分等级
     */
    public static final String ACTION_USER_POINT_RANK = BASE_HOST + "/v2/integral/userintegral";
    /**
     * 聚合接口
     * /v1/integral/userintegral 用户积分等级
     * /v2/user/get_info 用户信息
     */
    public static final String ACTION_USER_GET_USERINFOR_DETAIL = BASE_HOST + "/v2/gather/user/getuserintegral";


    //获取兑吧地址
    public static final String ACTION_USER_GET_DUIBAURL = BASE_HOST + "/v2/integral/getduibaisignactivity";
    //兑吧通用地址
    public static final String ACTION_USER_GET_DUIBA_LOGIN = BASE_HOST + "/v2/integral/getduibailoginurl";

    @Override
    public String getActionUrl(String s) {
        if (s.equals(ACTION_REGIST_USER)) {
            return ACTION_REGIST_USER;
        } else if (s.equals(ACTION_GET_USER_TOKEN)) {
            return ACTION_GET_USER_TOKEN;
        } else if (s.equals(ACTION_GET_USER_INFO_BASE)) {
            return ACTION_GET_USER_INFO_BASE;
        } else if (s.equals(ACTION_GET_DETAIL_USER_INFO)) {
            return ACTION_GET_DETAIL_USER_INFO;
        } else if (s.equals(ACTION_GET_USER_INFO_BASE_CIWONG)) {
            return ACTION_GET_USER_INFO_BASE_CIWONG;
        } else if (s.equals(ACTION_GET_SCHOOL_INFO)) {
            return ACTION_GET_SCHOOL_INFO;
        } else if (s.equals((ACTION_GET_MY_STUDY_RECORD))) {
            return ACTION_GET_MY_STUDY_RECORD;
        } else if (s.equals(ACTION_GET_LISTEN_WORK_CORRECT)) {
            return ACTION_GET_LISTEN_WORK_CORRECT;
        } else if (s.equals(ACTION_OPEN_EXPERIMENT)) {
            return ACTION_OPEN_EXPERIMENT;
        } else if (s.equals(ACTION_SERVICE_STATE)) {
            return ACTION_SERVICE_STATE;
        } else if (s.equals(ACTION_DOWORK_REPORT)) {
            return ACTION_DOWORK_REPORT;
        } else if (s.equals(ACTION_GET_TOKEN_BY_CODE)) {
            return ACTION_GET_TOKEN_BY_CODE;
        } else if (s.equals(ACTION_GET_TOKEN_BY_OPENID)) {
            return ACTION_GET_TOKEN_BY_OPENID;
        } else if (s.equals(ACTION_POST_UPDATE_USER_INFO)) {
            return ACTION_POST_UPDATE_USER_INFO;
        } else if (s.equals(ACTION_POST_UPDATE_USER_BG_INFO)) {
            return ACTION_POST_UPDATE_USER_BG_INFO;
        } else if (s.equals(ACTION_POST_UPDATE_USER_INFO_CIWONG)) {
            return ACTION_POST_UPDATE_USER_INFO_CIWONG;
        } else if (s.equals(ACTION_JOIN_CLASS)) {
            return ACTION_JOIN_CLASS;
        } else if (s.equals(ACTION_JOIN_CLASS_BY_ID)) {
            return ACTION_JOIN_CLASS_BY_ID;
        } else if (s.equals(ACTION_GET_CLASS_LIST)) {
            return ACTION_GET_CLASS_LIST;
        } else if (s.equals(ACTION_GET_CLASS_MEMBERS)) {
            return ACTION_GET_CLASS_MEMBERS;
        } else if (s.equals(ACTION_GET_CLASS_LIST_BY_MOBILE)) {
            return ACTION_GET_CLASS_LIST_BY_MOBILE;
        } else if (s.equals(ACTION_GET_CLASS_DETAIL)) {
            return ACTION_GET_CLASS_DETAIL;
        } else if (s.equals(ACTION_GET_CLASS_INFO)) {
            return ACTION_GET_CLASS_INFO;
        } else if (s.equals(ACTION_GET_WRONG_QUESTON)) {
            return ACTION_GET_WRONG_QUESTON;
        } else if (s.equals(ACTION_VERIFY_PWD)) {
            return ACTION_VERIFY_PWD;
        } else if (s.equals(ACTION_MODIFY_PWD)) {
            return ACTION_MODIFY_PWD;
        } else if (s.equals(ACTION_GET_SERVICE_LIST)) {
            return ACTION_GET_SERVICE_LIST;
        } else if (s.equals(ACTION_IS_BUY_SERVICE)) {
            return ACTION_IS_BUY_SERVICE;
        } else if (s.equals(GET_GET_SERVICE_PIRCE)) {
            return GET_GET_SERVICE_PIRCE;
        } else if (s.equals(GET_BIND_PHONE_INFO)) {
            return GET_BIND_PHONE_INFO;
        } else if (s.equals(ACTION_GET_SMS_VERITY_CODE)) {
            return ACTION_GET_SMS_VERITY_CODE;
        } else if (s.equals(ACTION_BIND_PHONE)) {
            return ACTION_BIND_PHONE;
        } else if (s.equals(ACTION_CHECK_SMS_VERITY_CODE)) {
            return ACTION_CHECK_SMS_VERITY_CODE;
        } else if (s.equals(ACTION_RESET_PSW)) {
            return ACTION_RESET_PSW;
        } else if (s.equals(ACTION_GET_USER_ID_BY_PHONE)) {
            return ACTION_GET_USER_ID_BY_PHONE;
        } else if (s.equals(Test)) {
            return Test;
        } else if (s.equals(ACTION_ADD_FEEDBACK_LOG)) {
            return ACTION_ADD_FEEDBACK_LOG;
        } else if (s.equals(ACTION_REF_PLAY_STATE)) {
            return ACTION_REF_PLAY_STATE;
        } else if (s.equals(ACTION_UPDATE_USER_TOKEN)) {
            return ACTION_UPDATE_USER_TOKEN;
        } else if (s.equals(ACTION_GET_ISSUED)) {
            return ACTION_GET_ISSUED;
        } else if (s.equals(ACTION_REF_PLAY_GET_ORDER)) {
            return ACTION_REF_PLAY_GET_ORDER;
        } else if (s.equals(ACTION_GET_SUBJECT_LIST)) {
            return ACTION_GET_SUBJECT_LIST;
        } else if (s.equals(ACTION_ADD_POINT)) {
            return ACTION_ADD_POINT;
        } else if (s.equals(ACTION_GET_POINT)) {
            return ACTION_GET_POINT;
        } else if (s.equals(ACTION_USER_POINT_RANK)) {
            return ACTION_USER_POINT_RANK;
        } else if (s.equals(ACTION_USER_GET_USERINFOR_DETAIL)) {
            return ACTION_USER_GET_USERINFOR_DETAIL;
        } else if (s.equals(ACTION_USER_GET_DUIBAURL)) {
            return ACTION_USER_GET_DUIBAURL;
        } else if (s.equals(ACTION_USER_GET_DUIBA_LOGIN)) {
            return ACTION_USER_GET_DUIBA_LOGIN;
        } else if (s.equals(ACTION_GET_MYPARENT)) {
            return ACTION_GET_MYPARENT;
        } else if (s.equals(ACTION_SEN_BUY_SERVICE)) {
            return ACTION_SEN_BUY_SERVICE;
        }
        return super.getActionUrl(s);
    }
}
